package com.shundr.common.view;

import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;

import com.actionbarsherlock.view.Window;
import com.shundr.R;
import com.shundr.base.BaseDialog;

public class DialogInvitationFlag extends BaseDialog {
	
	private OnSendListener sendListener;
	
	public DialogInvitationFlag(Context context){}
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		getDialog().requestWindowFeature((int) Window.FEATURE_NO_TITLE);
		setStyle(STYLE_NO_TITLE, R.style.dialog_no_overlay);
		View view = inflater.inflate(R.layout.dialog_invitation_flag, null);
		view.findViewById(R.id.btn_cancel).setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				dismiss();
			}
		});
		view.findViewById(R.id.btn_send).setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				sendListener.onSend();
				dismiss();
			}
		});
		return view;
	}
	
	public void setSendListener(OnSendListener sendListener) {
		this.sendListener = sendListener;
	}



	public interface OnSendListener{
		public void onSend();
	}
	
}
